SetVol
You can change the default volume and default directory using theSetVol
function.
FUNCTION SetVol (volName: StringPtr; vRefNum: Integer): OSErr;
volName
- A pointer to the name of a mounted volume.
vRefNum
- A volume reference number or a working directory reference number.
DESCRIPTION
TheSetVol
function sets the default volume and directory to the values specified in thevolName
andvRefNum
parameters. If you pass a volume reference number invRefNum
or a pointer to a volume name involName
,SetVol
makes the specified volume the default volume and the root directory of that volume the default directory. If you pass a working directory reference number invRefNum
,SetVol
makes the specified directory the default directory, and the volume containing that directory the default volume.RESULT CODES
noErr 0 No error nsvErr -35 No such volume bdNamErr -37 Bad volume name paramErr -50 No default volume